Page({
  editHouse(ev) {
    // 拿到当前房屋的id 进行房屋修改和回显
    console.log(ev.mark.id);
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id='+ev.mark.id,
    })
  },
  onLoad({id}){
    this.getHouseDetail(id)
  },
  // 获取房屋详情
  async getHouseDetail(id){
    const{code,data} = await wx.http.get('/room/'+id)
    if(code!==10000) return wx.utils.Toast()
    this.setData({
      ...data
    })
  }
})
